/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package guichatclient;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author s548169
 */
public class OptionFileIO {
    private File optionsFile;
    private OptionHandler options;
    public OptionFileIO(OptionHandler options){
        optionsFile = new File("Options.ini");
        this.options = options;
        if(!optionsFile.exists()){
            this.generateNew();
        }
    }
    private void generateNew(){
        try {
            optionsFile.createNewFile();
            options.setFirstRun(true);
        } catch (IOException ex) {
            Logger.getLogger(OptionFileIO.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
